package homewoek12月19号.homwwork.h1;

import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;

public class MainApp {
    public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {
        HashMap<String, Object> map = new HashMap<>();
        map.put("name","小黄");
        map.put("age",2);
        map.put("sex","男");
        Cat cat = new Cat();
        BeanUtils.populate(cat,map);
        System.out.println(cat);
    }
}
